package application;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import AbPattern.*;

public class MyController3 {
	@FXML
	private ImageView im;
	@FXML
	private Button bu;
	@FXML
	private ComboBox<String> co;
	@FXML
	private TextArea te;
	
	@FXML
	private ComboBox<String> co1;
	
	public MyController3(){}
	
	@FXML
	private void initialize() {}
	
	@FXML
	private void eventbutton(){
		String a = co.getValue();
		String b = co1.getValue();
		
		String ans = null;
		Creator c = Creator.getCreator(b);
		if(a.equals("Body Injure")){
		BodyInjur bodyinjur = 	c.getBodyinjurs();
		ans = bodyinjur.getBodyinjur();
		}
		else if(a.equals("Collision")){
		Collision collision = c.getCollisions();
		ans = collision.getCollision();
		}
		else if(a.equals("Com")){
			Com com = c.getComs();
			ans = com.getCom();
		}
		else if(a.equals("Person Injure")){
			PersonInjur personinjur = c.getPersoninjurs();
			ans = personinjur.getPersoninjur();
			
		}
		te.setText(ans);
	}
}